function statusbar_VidChangedFcn
%STATUSBAR_VIDCHANGEDFCN Summary of this function goes here
%   Detailed explanation goes here

fig= dhaqtool;
handles=guihandles(fig);
h= handles.gridStatusBar;

vid = getappdata(fig, 'vid');
obj= imaqhwinfo(vid);

e.Item='txtStatusBarCamera'; e.NewValue=obj.DeviceName;
gridStatusBar_UpdateFcn(h, e);
e.Item='txtStatusBarMode'; e.NewValue=vid.SelectedSourceName;
gridStatusBar_UpdateFcn(h, e);
vid_res= imaqhwinfo_GetResolution(vid);
e.Item='txtStatusBarResolution'; e.NewValue= sprintf('%dx%d', vid_res(1), vid_res(2));
gridStatusBar_UpdateFcn(h, e);
e.Item='txtStatusBarFrameRate'; e.NewValue='TODO: Fps';
gridStatusBar_UpdateFcn(h, e);

end

